<!--
 * @Author: zhong_m
 * @Date: 2022-01-19 16:34:46
 * @LastEditTime: 2022-07-19 09:26:23
 * @LastEditors: chen_yt
 * @Description: 
 * @FilePath: \central-system\src\modules\Login\index.vue
-->
<template>
  <div class="loginPage">
    <router-view />
    <language v-if="i18n" class="langSet" />
    <developers
      v-if="developerFlag"
      style="position: absolute; z-index: 10000; bottom: 40px; right: 40px"
      @closeMode="closeMode"
    />
    <div class="copyright">
      {{ copyright }}
    </div>
  </div>
</template>
<script>
import Developers from './components/Developers'
import Language from './components/Language'
import Mix from '@/mixins/module'
import { mapGetters } from 'vuex'
import * as types from '@/store/Getter/getterTypes'

export default {
  name: 'Login',
  components: {
    Developers,
    Language
  },
  mixins: [Mix],
  data() {
    return {}
  },
  computed: {
    ...mapGetters([types.COPYRIGHT, types.I18N, types.DEVELOPER_FLAG])
  },
  mounted() {
    this.$storage.remove('current_auth_portal')
    this.$store.commit('CLEAN_WEBSOCKET_POOL')
  },
  methods: {
    //关闭开发者模式
    closeMode() {
      this.$store.commit('setDeveloperFlag', 0)
    }
  }
}
</script>
<style lang="scss" scoped>
.loginPage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 680px;
  background: url('../../assets/img/login/login-bg.png') no-repeat 0 0;
  background-size: cover;
}

.langSet {
  position: absolute;
  top: 40px;
  right: 40px;
}

.copyright {
  position: absolute;
  bottom: 40px !important;
  width: 100%;
  margin-left: 0;
  font-weight: 400;
  line-height: 20px;
  text-align: center;
  color: #999;
}
</style>
<style lang="scss">
.fks-message-box.developerMode {
  width: 400px !important;
  height: 185px !important;
  padding: 0 !important;

  .fks-message-box__content {
    height: 90px !important;
    padding: 16px 16px 0 !important;
  }
}
</style>
